package cn.chenchao.eshop.goods.service.imp;

import cn.chenchao.eshop.goods.dao.imp.GoodsDAOImpl;
import cn.chenchao.eshop.goods.entity.Goods;
import cn.chenchao.eshop.goods.service.IGoodService;
import util.JsonUtil;

import java.util.List;

/**
 * @encoding : UTF-8
 * @Time : 2020/11/23 13:37
 * @Author : Chen Chao
 * @File : eshop.cn.chenchao.eshop.goods.service.imp.GoodServiceImpl.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 */
public class GoodServiceImpl implements IGoodService {
    /*获取所有的商品列表并转成字符串*/
    @Override
    public List<Goods> goodsList()  {
        /*1.获取商品列表*/
        GoodsDAOImpl goodsDAO = new GoodsDAOImpl();
        try {
            return goodsDAO.getEntityList();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public String goodsDetailList() {
        return null;
    }
}
